﻿using UnityEngine;
using System.Collections;

public class DetailView : MonoBehaviour {
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	}

    void OnClick()
    {
        GameObject.Find("MysoldierBtn").GetComponent<RightButtons>().OnClick();
        GameObject.Find("UnitNoteParent(Clone)").GetComponent<UnitNoteParent>().m_bHoverInformDetailView = true;
        for (int i = 0; i < GameObject.Find("SceneDataMgr").GetComponent<SceneDataMgr>().UnitList.Count; ++i)
        {
            if (transform.parent.parent.gameObject.GetComponent<HoverUnitInformUI>().m_pOwner.GetComponent<UnitStatus>().m_unitData == GameObject.Find("SceneDataMgr").GetComponent<SceneDataMgr>().UnitList[i].m_unitData)
            {
                GameObject.Find("UnitNoteParent(Clone)").GetComponent<UnitNoteParent>().iHoverInformSelUnitIndex = i;
            }
        }
    }

    void OnHover(bool isOver)
    {
        if (isOver)
            InputMgr.GetInstance().m_bUnitHoverUI = true;
        else
            InputMgr.GetInstance().m_bUnitHoverUI = false;
    }
}
